<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Permissions-Policy" content="microphone=*; camera=*;">
	<title>WebRTC</title>
</head>

<body></body>

<script>
	function getUrlQueryParams() {
		let obj = getQueryParams()
		console.log('offer111----', obj)
		if (obj.offer0) {
			localStorage.setItem('_offer0', obj.offer0)
		}
		if (obj.offer1) {
			localStorage.setItem('_offer1', obj.offer1)
		}
		if (obj.offer2) {
			localStorage.setItem('_offer2', obj.offer2)
		}
		if (obj.offer3) {
			localStorage.setItem('_offer3', obj.offer3)
		}
		if (obj.offer4) {
			localStorage.setItem('_offer4', obj.offer4)
		}
	}
	// 获取路径上的参数
	function getQueryParams() {
		var queryString = location.search;
		var queryParams = {};
		if (queryString.indexOf('?') === 0) {
			queryString = queryString.substring(1);
		}
		var pairs = queryString.split('&');
		for (var i = 0; i < pairs.length; i++) {
			var pair = pairs[i].split('=');
			var key = decodeURIComponent(pair[0]);
			var value = decodeURIComponent(pair[1]);
			queryParams[key] = value;
		}
		return queryParams;
	}

	getUrlQueryParams()

</script>

</html>